libmystdio.so:mystdio.o mystring.o
	@gcc -o $@ $^ -shared
	@echo "build $^ to $@ ... done"
%.o:%.c
	@gcc -fPIC -c $< 
	@echo "compling $< to $@ ... done"
.PHONY:clean
clean:
	@rm -rf *.so *.o stdc*
	@echo "clean ... done"
.PHONY:output
output: # 把头文件和动态库打包压缩成 stdc.tgz
	@mkdir -p stdc/include
	@mkdir -p stdc/lib
	@cp -f *.h stdc/include
	@cp -f *.so stdc/lib
	@tar -czf stdc.tgz stdc
	@echo "output stdc ... done"